package FIT::Fixture::KeyValue;

use FIT::Class;
use FIT::TypeAdapter;

extends 'FIT::Fixture::Base';

augment do_cell => sub {};

after do_cells => sub {
    my $first_cell = shift;
    my $key        = $first_cell->fit_identifier;
    my $value_cell = $first_cell->next_cell;
    my $adapter    = adapt adaptee => $self, name => $key;

    $adapter->parse_and_set($value_cell);
};

after do_rows => sub { $self->apply( shift->table ) };

